package service.impl;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import model.Ticket;
import service.TicketService;
import dao.PassengerDAO;
import dao.RoleDAO;
import dao.TicketDAO;

@Stateless
public class TicketServiceImpl implements TicketService {
	
	@EJB
	private TicketDAO ticketDAO;
	
	@EJB
	private PassengerDAO passengerDAO;
	
	@EJB
	private RoleDAO roleDAO;

	@Override
	public List<Ticket> findAll() {
		return ticketDAO.findAll();
	}

	@Override
	public Ticket findById(Integer id) {
		return ticketDAO.find(id);
	}


	@Override
	public void delete(Ticket ticket) {
		ticketDAO.delete(ticket);

	}
}
